package com.magold.game.factory;

import com.magold.io.XMLReader;
import com.magold.io.helper.ReaderFacade;
import com.magold.logic.ISpriteLogic;
import com.magold.logic.pipe.PipeEntrance;

public class PipeFactory extends BaseLogicFactory {

	public PipeFactory() {
		super(PipeEntrance.class.getSimpleName());
	}

	@Override
	protected ISpriteLogic createSafely(XMLReader pReader) {
		float[] xCoors = ReaderFacade.getArray(pReader, "x_coors", "\\s");
		float[] yCoors = ReaderFacade.getArray(pReader, "y_coors", "\\s");
		
		return new PipeEntrance(xCoors, yCoors);
	}

}
